<?php include $this->tpl('public:common.php') ?>
<select name="group_id" onchange="javascript:location.replace('/os/groupRole?group_id='+this.options[this.selectedIndex].value)" style="margin:5px 0px 0px">
	<?php foreach($group_option_list as $_val=>$_name):?>
		<option value="<?=$_val?>"<?=$group_id==$_val ? ' selected' : ''?>><?=$_name?></option>
	<?php endforeach?>
</select>
<form method="post" action="">
<?php foreach($role_list as $role):?>
	<?php if(isset($role['menu_info']) && count($role['menu_info']) >0):?>
		<div class="block">
			<a href="#page-stats_<?=$role['module_id']?>" class="block-heading" data-toggle="collapse"><?=$role['module_name']?></a>
			<div id="page-stats_<?=$role['module_id']?>" class="block-body collapse in">
			<?php foreach($role['menu_info'] as $menu):?>
				<?php if($menu['father_menu']==0):?>
					<div style="border-bottom:1px dotted #ccc;">
						<label style="display: inline-block;font-size: 12px;width: 180px"><input type="checkbox" name="menu_ids[]" value="<?=$menu['menu_id']?>"<?=in_array($menu['menu_id'],$group_role) ?  ' checked="checked"' : ''?>><?=$menu['menu_name']?></label>
						<?php foreach($role['menu_info'] as $menu2):
							if($menu2['father_menu']==$menu['menu_id']):?>
								<label style="display: inline-block;font-size: 12px;width: 180px"><input type="checkbox" name="menu_ids[]" value="<?=$menu2['menu_id']?>"<?=in_array($menu2['menu_id'],$group_role) ?  ' checked="checked"' : ''?>><?=$menu2['menu_name']?></label>
							<?php endif;
						endforeach?>
					</div>
				<?php endif?>
			<?php endforeach?>
			</div>
		</div>
	<?php endif?>
<?php endforeach?>										
	<div>
		<button class="btn btn-primary">更新</button>
	</div>
</form>

<?php include $this->tpl('public:footer.php') ?>